using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LineRot : MonoBehaviour
{
    private Material material;

    private float interval;
    // Start is called before the first frame update
    void Awake()
    {
        material = GetComponent<LineRenderer>().material ;
    }

    // Update is called once per frame
    void Update()
    {
        interval -= Time.deltaTime;
        // 设置材质偏移,实现材质滚动效果
        material.mainTextureOffset = new Vector2(0, interval * 0.5f);
    }
}
